package mapper;

import entity.Customer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface CustomerMapper {
    //插入数据
    int insert(Customer customer);

    //查询数据

    List<Customer> selectAll();
    //根据id查询数据
    @Select("select * from customer where id=#{id}")
    Customer selectById(Integer id);
    //分页查询
    List<Customer> selectByPage(Map<String,Object> params);




    //修改数据
    int update(Customer customer);
    //删除数据

    int batchDelete(Integer[] ids);
}
